<?php 
$user = View::get('user'); 
$profile = View::get('profile');

?>
<form action="index.php?controller=user&action=update" method="POST" class="uniForm"> 
<div class="round left half">
    <div class="round-head">
    <h2>Dane podstawowe</h2>
    </div>
    
    <div class="round-content">
           <fieldset class="inlineLabels">
                    <input type="hidden" name="user[id_user]" value="<?php echo $user['id']; ?>" />
                    <div class="ctrlHolder"> 
                            <label>Login</label> 
                            <input type="text" id="name3" readonly value="<? echo $user['login']; ?>" size="35" class="textInput"/> 
                    </div> 

                    <div class="ctrlHolder"> 
                            <label>Typ uprawnień</label> 
                            
                            <select name="user[privs]">
                                <?php foreach (Privileges::getArray() as $k => $v): ?>
                                <option value="<?php echo $user['privs'] ?>" <?php if ($k==$user['privs']) echo "selected" ?>><?php echo $v ?></option>
                                <?php endforeach; ?>
                            </select>
                    </div>
                
                    <div class="ctrlHolder"> 
                            <label>E-mail</label>                             
                            <input type="text" id="name3" name="user[email]" value="<?php echo $user['email']; ?>" size="35" class="textInput"/> 
                            <p class="formHint">Use a real email address that you often check for messages</p> 
                    </div> 
                    
                    <div class="ctrlHolder" >  
                            <label>Pozostałe</label> 
                            <input type="checkbox" id="name3" name="user[is_active]" <?php if (intval($user['is_active']) == 1) echo "checked"; ?> class="textInput"  style="width: auto;"/>Aktywny                            
                            <p class="formHint">Use a real email address that you often check for messages</p> 
                    </div> 

                    <!--<div class="ctrlHolder"> 
                            <p class="label">Atrybuty</p> 
                            <ul class="blockLabels"> 
                                    <li><label for="age_1"><input type="radio" id="age_1" name="age"/> I'm under 18</label></li> 
                                    <li><label for="age_2"><input type="radio" id="age_2" name="age" checked="checked"/> 18–30</label></li> 
                                    <li><label for="age_3"><input type="radio" id="age_3" name="age"/> 30 and over</label></li> 
                            </ul> 
                    </div> -->

                    <div class="buttonHolder">  
                            <input type="submit" class="primaryAction" value="Uaktualnij"/> 
                    </div> 
            </fieldset> 
    

    </div>
  
</div>  
    
    <div class="round right half">
    <div class="round-head">
    <h2>Profil</h2>
    </div>
    
    <div class="round-content">

   
            <fieldset class="inlineLabels">                   
                    <div class="ctrlHolder"> 
                            <label for="name3">Nazwisko</label> 
                            <input type="text" id="name3" name="profile[lastname]" value="<? echo $profile['lastname']; ?>" size="35" class="textInput"/> 
                    </div> 
                    
                    <div class="ctrlHolder"> 
                            <label for="name3">Imie</label> 
                            <input type="text" id="name3" name="profile[firstname]" value="<? echo $profile['firstname']; ?>" size="35" class="textInput"/> 
                    </div> 
                    
                    <div class="ctrlHolder"> 
                            <label for="name3">Nick</label> 
                            <input type="text" id="name3" name="profile[nick]" value="<? echo $profile['nick']; ?>" size="35" class="textInput"/> 
                    </div> 
                    
                    <div class="ctrlHolder"> 
                            <label for="name3">Website</label> 
                            <input type="text" id="name3" name="profile[website]" value="<? echo $profile['website']; ?>" size="35" class="textInput"/> 
                    </div> 
                    
                    <div class="ctrlHolder"> 
                            <label for="name3">Skype</label> 
                            <input type="text" id="name3" name="profile[skype]" value="<? echo $profile['skype']; ?>" size="35" class="textInput"/> 
                    </div> 

                    <div class="buttonHolder">  
                            <button type="submit" class="primaryAction">Uaktualnij</button> 
                    </div> 
            </fieldset> 
      </div>
</div>
</form> 